package com.qf.service;

import com.qf.mapper.UserMapper;
import com.qf.pojo.SysUsers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Set;

@Service
public class UserServiceImpl implements UserService{
    @Autowired
    private UserMapper userMapper;
    @Override
    public SysUsers findUserByName(String userName) {
        SysUsers userByName = userMapper.findUserByName(userName);

        return userByName;
    }

    @Override
    public Set<String> findRolesByUid(int uid) {
        Set<String> list = userMapper.findRolesByUid(uid);
        return list;
    }

    @Override
    public Set<String> findPermByUid(int uid) {
        Set<String> list = userMapper.findPermByUid(uid);

        return list;
    }

    @Override
    public List<SysUsers> findUserAll() {
        List<SysUsers> userAll = userMapper.findUserAll();
        return userAll;
    }
}
